import { translate } from '@/service/translate'

export const useSse = () => {
  const { eventSource, uid } = translate.createSse()

  const close = () => {
    eventSource.close()
  }

  return {
    eventSource,
    close,
    uid
  }
}
